package com.dailyblue.smbms.service;

import com.dailyblue.smbms.bean.PageInfo;
import com.dailyblue.smbms.bean.User;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

public interface UserService {
    List<User> find(int page);

    PageInfo<List<User>> findByPage(int page);

    User findById(int id);

    void save(HttpServletRequest request);

    PageInfo<List<User>> findByNameAndRole(String name, String role, int page);

    boolean checkIsUnique(String field, String value);

    void removeById(int id);

    void update(HttpServletRequest request);

    void updatePass(int id, String newPass);

    User login(String code, String password);

    boolean checkPassIsRight(int id, String oldPass);
}